name: gamehub
version: "0.6.0"
summary: Games manager written in Vala that supports GOG, Steam and Humble Bundle
description: |
    Games manager/downloader/library written in Vala
    Currently supported sources: Steam, GOG, Humble Bundle
icon: ../data/com.github.tkashkin.gamehub.svg
grade: stable
confinement: strict

plugs:
    gnome-3-26-1604:
        interface: content
        target: $SNAP/gnome-platform
        default-provider: gnome-3-26-1604:gnome-3-26-1604
    gtk-3-themes:
        interface: content
        target: $SNAP/usr/share/themes
        default-provider: gtk-common-themes:gtk-3-themes
    icon-themes:
        interface: content
        target: $SNAP/usr/share/icons
        default-provider: gtk-common-themes:icon-themes
    sound-themes:
        interface: content
        target: $SNAP/usr/share/sounds
        default-provider: gtk-common-themes:sounds-themes

apps:
    gamehub:
        command: desktop-launch snapcraft-preload $SNAP/usr/bin/com.github.tkashkin.gamehub
        desktop: usr/share/applications/com.github.tkashkin.gamehub.desktop
        environment:
            LD_LIBRARY_PATH: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/:$LD_LIBRARY_PATH
        plugs: [network, network-observe, browser-support, gsettings, home, desktop, desktop-legacy, pulseaudio, opengl, x11, wayland, mir]

parts:
    gamehub:
        source: ..
        plugin: meson
        meson-parameters: [--prefix=/usr, -Ddistro=generic, -Dsnap=true]
        after: [desktop-gtk3, snapcraft-preload]
        build-packages:
            - build-essential
            - meson
            - libgtk-3-dev
            - libglib2.0-dev
            - libwebkit2gtk-4.0-dev
            - libjson-glib-dev
            - libgee-0.8-dev
            - libsoup2.4-dev
            - libsqlite3-dev
        stage-packages:
            - libgl1
            - binutils
            - libwebkit2gtk-4.0-37
            - libcairo2
            - libgdk-pixbuf2.0-0
            - libglib2.0-0
            - libgstreamer1.0-0
            - libgtk-3-0
            - libjavascriptcoregtk-4.0-18
            - libpango-1.0-0
            - libsoup2.4-1
